include $(top_srcdir)/src/common.mk

AUTOMAKE_OPTIONS = gnu

EXTRA_DIST =            packets/packet01.pcap \
                        packets/packet02.pcap \
                        packets/packet03.pcap \
                        packets/packet04.pcap \
                        packets/packet05.pcap \
                        packets/packet06.pcap \
                        packets/packet07.pcap \
                        packets/packet08.pcap \
                        packets/packet09.pcap \
                        packets/packet10.pcap \
                        packets/packet11.pcap \
                        packets/packet12.pcap

noinst_HEADERS =	OpenFlowProtocol.h test_openflow.h

TEST = test_openflow

check_PROGRAMS = test_openflow

test_openflow_SOURCES =	../../Multiplexer.cc ../../ElapsedTime.cc \
			../../Protocol.cc \
			../../Packet.cc \
			../../Logger.cc \
			../../IPAddress.cc \
			../../StringCache.cc ../../StringMap.cc \
			../ethernet/EthernetProtocol.cc \
			../../Flow.cc \
			../../AnomalyManager.cc \
			../../FlowRegexEvaluator.cc \
			../../FlowForwarder.cc \
			../../flow/FlowTable.cc \
			../../flow/FlowManager.cc \
			../ip/IPProtocol.cc \
			../../ipset/IPSet.cc \
			../../ipset/IPBloomSet.cc \
			../../ipset/IPRadixTree.cc \
			../../ipset/IPSetManager.cc \
			../udp/UDPProtocol.cc \
			$(TEST_FLOW_OBJECTS) \
			../udpgeneric/UDPGenericProtocol.cc \
			../tcpgeneric/TCPGenericProtocol.cc \
			../tcp/TCPProtocol.cc \
			../../regex/RegexManager.cc \
			../../regex/Regex.cc \
			../../names/DomainNameManager.cc \
			../../names/DomainNode.cc \
			../../names/DomainName.cc \
			../dns/DNSProtocol.cc \
			../icmp/ICMPProtocol.cc \
			OpenFlowProtocol.cc test_openflow.cc

test_openflow_CPPFLAGS = $(EXTRA_TEST_CPPFLAGS) -I../.. $(BOOST_CPPFLAGS) -DSTAND_ALONE_TEST
test_openflow_LDFLAGS = $(EXTRA_TEST_LDFLAGS)
test_openflow_LDADD   = $(BOOST_LDFLAGS) $(PCRE_LIB) $(LOGGING_FLAGS) -lpthread -lboost_system -lboost_unit_test_framework

CLEANFILES = *.o *.lo *.so

MAINTAINERCLEANFILES = \
        $(srcdir)/Makefile \
        $(srcdir)/Makefile.in \
        `rm -rf $(srcdir)/build `

